// Table A2. Robustness checks

// Panel A
use "eseewithinfirm.dta", clear
local filename "tableA2_panelA"
xi: xtreg lnval crisisXlonginv i.category, fe cluster(firmid)
outreg2  using "`filename'", word replace label  nocons dec(3) keep(crisisXlonginv)
foreach reg in  longinv10 longinv11 longinv12 longinv13 deprate {
cap drop crisisXlonginv
gen crisisXlonginv=crisis*`reg'
label var crisisXlonginv "(Time-to-payoff measure)*after 2008 dummy"
xi: xtreg lnval crisisXlonginv i.category , fe cluster(firmid)
outreg2  using "`filename'", word  label  nocons dec(3)  keep(crisisXlonginv)
}


// Panel B
use "eseewithinfirm.dta", clear
local filename "tableA2_panelB"
local a=1
levelsof category
foreach var in `r(levels)' {
di "`var'"
xi: xtreg lnval crisisXlonginv i.category if category!="`var'", fe cluster(firmid )
if `a'==1 {
outreg2  using "`filename'", word replace label  nocons dec(3) addtext(Category excluded, "`var'" ) keep(crisisXlonginv)
}
else {
outreg2  using "`filename'", word label  nocons dec(3) addtext(Category excluded, "`var'" ) keep(crisisXlonginv)
}
local ++a
}
